

<?php
$q=$_GET["q"];

$con = mysql_connect('localhost', 'fossilplot', 'fossilplot');
if (!$con)
 {
 die('Could not connect: ' . mysql_error());
 }

mysql_select_db("fossilplot", $con);

$sql="SELECT * FROM ajax_demo WHERE id = '".$q."'";

$result = mysql_query($sql);

//echo "<table border='1'>
//<tr>
//<th>Firstname</th>
//<th>Lastname</th>
//<th>Age</th>
//<th>Hometown</th>
//<th>Job</th>
//</tr>";
echo "<form name=\"mainform\">	<select name=\"M\" size=5 multiple>";

while($row = mysql_fetch_array($result))
 {
 //echo "<tr>";
 //echo "<td>" . $row['FirstName'] . "</td>";
 //echo "<td>" . $row['LastName'] . "</td>";
 //echo "<td>" . $row['Age'] . "</td>";
 //echo "<td>" . $row['HomeTown'] . "</td>";
 //echo "<td>" . $row['Job'] . "</td>";
 //echo "</tr>";
	echo "<option>".$row['FirstName'] ."</option>";
 }
//echo "</table>";





echo "</form>";
mysql_close($con);
?>

